package org.example.all;

import org.example.socket.MyClassLoader;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;

public class FileOperate {
    public static void main(String[] args) throws Exception {
        filePro("/Users/yeym/fanruan/view-dump.sql");
    }


    private static void filePro(String filePath) throws Exception {
//        Path path = Paths.get(filePath);
        FileInputStream fis = new FileInputStream(filePath);
        byte[] bytes = new byte[1024 * 1024 * 10 + 300];
//        BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(fis));
        int read = fis.read(bytes);
        System.out.println(new String(bytes));
        Files.write(Paths.get("123.sql"),bytes);
    }



}

